


import { HashRouter as Router, Route, NavLink, Redirect } from 'react-router-dom'


let token = false




export default function Author ({ component: Component, ...rest }) {
    // console.log(props)
    // const { component: Component } = props

    return (

        (<Route {...rest}

            render={(props) => {

                return (

                    token ? <Component {...props}></Component> : <Redirect to={{ pathname: "/login" }} />



                )

            }}
        ></Route>)



    )


}


